package com.superzqb.asus.superzqbActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import com.superzqb.asus.Api.UsersApi;
import com.superzqb.asus.superzqb.R;
import com.superzqb.asus.superzqbUtil.GeneralFun;

import retrofit2.Retrofit;


public class Register extends Activity implements OnClickListener {
	private Button btnVerify,btnReg;
	private ImageView btnBack;
	private EditText name,pwd1,pwd2;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		 setContentView(R.layout.register);
		 initView();//初始化视图
	}
	
	private void initView() {
		// TODO Auto-generated method stub
		btnBack=(ImageView)findViewById(R.id.back);
		btnVerify=(Button)findViewById(R.id.getVerify);
		btnReg=(Button)findViewById(R.id.btnReg);
		name=(EditText)findViewById(R.id.user);
		pwd1=(EditText)findViewById(R.id.pwd0);
		pwd2=(EditText)findViewById(R.id.pwd1);
		btnBack.setOnClickListener(this);
		btnVerify.setOnClickListener(this);
		btnReg.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent intent=new Intent();
		switch(v.getId()){
		case R.id.back:
			intent.setClass(Register.this,Login.class);
			startActivity(intent);
			finish();
			break;
		case R.id.getVerify:/*获取验证码*/
			break;
		case R.id.btnReg:/*注册*/
			toRegister();
		}
	}

	private void toRegister() {
		Retrofit retrofit=new GeneralFun().scalarsCreate();
		UsersApi api=retrofit.create(UsersApi.class);


	}


}
